package com.py.credit.service;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.py.credit.common.rest.RestServiceResult;
import com.py.credit.entity.ModelTestPc;
import com.py.framework.core.common.Page;
import com.py.framework.core.entity.SysOfficeEntity;

public interface BusinessModelBindService {

	void insertIntoBusiness(@Param(value="map")Map<String,String> map);
	
	void updateBusiness(@Param(value="map")Map<String,String> map);
	
	void deleteBusiness(@Param(value="list")List<Integer> list);
	
	String selectModelId(@Param(value="name")String name);
	
    
	public List<Map<String, Object>> getByConditionForPage(List<String> showColumns, String[] additionalColumns,
			String condition, Page page);
	
	public List<Map<String, Object>> getBindByConditionForPage(String officeId,String modelName,String showScoreLine,List<String> showColumns, String[] additionalColumns,
			String condition, Page page);
	
	public Map<String,Integer> countScoreRank(@Param(value="pcId")String pcId);

	public List<String> countChartByPer(@Param(value = "pcId")String pcId);

	 public RestServiceResult<List<Map<String,Object>>> countChartByPerFar(String  tybms, String jdToken);
	 
	 public RestServiceResult<Map<String,Object>> getQyinfos(String  tybm, String jdToken);
	 
	 public RestServiceResult<Map<String,Object>> blackOrRed(String  tybm, String jdToken);
	 
		
		
		public Map<String, Object> getBindInfo(@Param(value = "id")String id);
		
		public int insertBindInfo(@Param(value = "name")String name,@Param(value = "modelId")String modelId,@Param(value = "ywId")String ywId,@Param(value = "showScoreLine")String showScoreLine);

		public int updateBindInfo( @Param(value = "name")String name,@Param(value = "modelId")String modelId,@Param(value = "ywId")String ywId,@Param(value = "showScoreLine")String showScoreLine,@Param(value = "id")String id);

		public int updateBindInfoStatus(@Param(value = "id")String id,@Param(value = "status")String status);
		
		public int deleteBindInfo(@Param(value = "ids")List<String> ids);
		
		public  List<Map<String, Object>> getTopPoints();
		
		public  List<Map<String, Object>> getIndexs(@Param(value = "parentId")String parentId,@Param(value = "modelId")String modelId);
		
		public  Map getRadarData(@Param(value = "tybm")String tybm,@Param(value = "pcId")String pcId,@Param(value = "score")String score,@Param(value = "jdToken")String jdToken );

		public int updateYysx(@Param(value = "batchId")String batchId,@Param(value = "id")String id,@Param(value = "jdToken")String jdToken);

		public String getEvailInfoScore(@Param(value="tybm") String tybm);

		public List<Map<String,Object>> autoScoreUpload(ModelTestPc modelTestPc, String batchId);

		public void updateImportId(@Param(value = "importId") String importId,
								   @Param(value = "tybm") String tybm,
								   @Param(value = "pcId") String pcId);

		void dzAutoScoreUpload(String qymc,String tybm,String modelId, String dataId,String mainType,Double initIndexScore);

	    Map dzGetScoreData(String modelId,String tybm,String dataId);
	    
	    List<SysOfficeEntity> getTopLevelDept();
	    
	    List<String>  getAlreadyDistributeRecord(String id);
	    
	    void distributeCommonResource(String id, List<Map<String, String>> depts);
	    
	    SysOfficeEntity getOfficeById(String officeId);
	    
	    int  isAddDept(String deptId,String id);
	    
	    int  isUpdateDept(String modelId,String ywId,String deptId,String id);
}
